package com.itheima.mapper;

import com.itheima.dto.SubShoppingCartDto;
import com.itheima.pojo.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author YangJiaHao
 */
@Mapper
public interface ShoppingCartMapper {

    ShoppingCart selectShoppingCartById(@Param("dishId") String dishId, @Param("setmealId") String setmealId);

    Integer updateNumberById(@Param("id") String id,@Param("number") Integer number);

    Integer insertShoppingCart(@Param("shoppingCart") ShoppingCart shoppingCart);

    List<ShoppingCart> selectAll();

    Integer deleteAll(@Param("id") String id);

    ShoppingCart selectShoppingCartByDto(@Param("dto") SubShoppingCartDto dto);

    Integer updateNumberByDto(@Param("dto") SubShoppingCartDto dto, @Param("number") Integer number);

    Integer deleteById(@Param("dto") SubShoppingCartDto dto);

}
